London | 26-ITP-May | Khaliun Baatarkhuu | Sprint 2 | Coursework#1355
Open
khaliun-dev wants to merge 13 commits into
Open
London | 26-ITP-May | Khaliun Baatarkhuu | Sprint 2 | Coursework#1355khaliun-dev wants to merge 13 commits into
khaliun-dev wants to merge 13 commits into
Conversation
Removed duplicate declaration of 'str' in the capitalise function.
Removed clashing variable and corrected function call.
Fixed the square function to accept a parameter and return its square.
Updated the multiply function to return the product instead of just logging it. This allows the result to be used in the template literal.
Removed semicolon to ensure the sum function returns the correct value.
Updated getLastDigit function to accept a parameter and return the last digit of the input number. Adjusted console.log calls to use the function correctly.
Implemented the toPounds function to convert pence to pounds format.
Added answers to questions regarding the pad function in time formatting.
Refactor formatAs12HourClock function to handle noon and midnight correctly.
LonMcGregor
reviewed
Jun 22, 2026
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work on all these tasks, and well done for attempting the stretch. You can continue to work on that, otherwise this task is complete now.
| console.log(calculateBMI(80, 1.76)); | ||
|
|
||
| 25.8 | ||
| //(I am officially overweight, :( |
There was a problem hiding this comment.
BMI has lots of limitations as a measuring system, so don't worry about it too much :)
| console.assert(currentOutput3 === targetOutput3); | ||
|
|
||
| console.log(formatAs12HourClock("15:29")); | ||
|
|
There was a problem hiding this comment.
Now that you have found the bugs, do you know what would be needed to fix them?
Author
There was a problem hiding this comment.
Thanks for reviewing my code. I have fixed both bugs. Cheers.
Handle special case for 12 PM in formatAs12HourClock function.
Fixed time formatting to include minutes in 12-hour clock.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self checklist
Changelist
Questions
None so far.